package com.note.chh.notebook.Adapter;

import android.support.annotation.LayoutRes;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.note.chh.notebook.Model.Note;
import com.note.chh.notebook.R;

/**
 * Created by caihuahui on 2018/2/27.
 */

public class NoteAdapter extends BaseQuickAdapter<Note,BaseViewHolder> {
    public NoteAdapter(@LayoutRes int layoutResId) {
        super(layoutResId);
    }

    @Override
    protected void convert(BaseViewHolder helper, Note item) {
        helper.setText(R.id.mText_title,item.getTitle())
                .setText(R.id.mText_content,item.getContent())
                .setText(R.id.mText_time,item.getTime())
                .addOnClickListener(R.id.mImage_edit);
    }
}
